home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-05-01 | 7.2 KB | 270 lines | [TEXT/MPS ] |
- ;
- ; File: LanguageAnalysis.a
- ;
- ; Contains: Language Analysis Manager Interfaces
- ;
- ; Version: Technology: System 8
- ; Release: Universal Interfaces 3.0d3 on Copland DR1
- ;
- ; Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
- ;
- ; Bugs?: If you find a problem with this file, send the file and version
- ; information (from above) and the problem description to:
- ;
- ; Internet: apple.bugs@applelink.apple.com
- ; AppleLink: APPLE.BUGS
- ;
- ;
- IF &TYPE('__LANGUAGEANALYSIS__') = 'UNDEFINED' THEN
- __LANGUAGEANALYSIS__ SET 1
-
- IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
- include 'Types.a'
- ENDIF
- IF &TYPE('__AEDATAMODEL__') = 'UNDEFINED' THEN
- include 'AEDataModel.a'
- ENDIF
- IF &TYPE('__AEREGISTRY__') = 'UNDEFINED' THEN
- include 'AERegistry.a'
- ENDIF
- IF &TYPE('__FILEMANAGERTYPES__') = 'UNDEFINED' THEN
- include 'FileManagerTypes.a'
- ENDIF
- IF &TYPE('__LOCALEOBJECTS__') = 'UNDEFINED' THEN
- include 'LocaleObjects.a'
- ENDIF
- IF &TYPE('__DICTIONARY__') = 'UNDEFINED' THEN
- include 'Dictionary.a'
- ENDIF
- IF FOR_SYSTEM8_PREEMPTIVE THEN
- IF FOR_PTR_BASED_AE THEN
- ; typedef UInt32 LAItemOffset
-
- ; typedef LocaleObjectRef LAEnvironmentLocaleObjectRef
-
-
-
- ; typedef AEKeyword LAPropertyKey
-
- ; typedef DescType LAPropertyType
-
- ;
- ; Names for Environment Locale Object Attribute Names and Values
- ;
- ; Japanese Kana-Kanji conversion
- ; Japanese TTS
- ; General Morpheme Analysis
- ;
- ; Tags for Environment Properties
- ;
-
- keyAELAAutoLearning EQU 'laal' ; Boolean
- keyAELALearningDictionary EQU 'lald' ; Some permanent file specification
- keyAELADictionaryList EQU 'ladc' ; AEList which has a list of dictionary informaion.
- ;
- ; Tags for dictionary information
- ;
-
- keyAELADictionaryFile EQU 'dfil' ; Some permanent file specification
- keyAELADictionaryWeight EQU 'dwgt' ; Int32
- keyAELADictionaryID EQU 'did ' ; DictionaryID (r/o, volatile)
- LAMorphemeBundle RECORD 0
- f ds AERecord
- sizeof EQU * ; size: $8 (8)
- ENDR
-
-
- LAMorphemePath RECORD 0
- f ds AERecord
- sizeof EQU * ; size: $8 (8)
- ENDR
-
-
- LAMorpheme RECORD 0
- f ds AERecord
- sizeof EQU * ; size: $8 (8)
- ENDR
-
-
- LAHomograph RECORD 0
- f ds AERecord
- sizeof EQU * ; size: $8 (8)
- ENDR
-
-
-
- typeLAMorphemeBundle EQU 'lmfb'
- typeLAMorphemePath EQU 'lmfp'
- typeLAMorpheme EQU 'lmfn'
- typeLAHomograph EQU 'lmfh'
-
- keyAELAMorphemeBundle EQU 'lmfb'
- keyAELAMorphemePath EQU 'lmfp'
- keyAELAMorpheme EQU 'lmfn'
- keyAELAHomograph EQU 'lmfh'
-
- kLADefaultEdge EQU 0
- kLAFreeEdge EQU 1
- kLAIncompleteEdge EQU 2
-
- kAllMorphemes EQU -1
-
- kNoContext EQU 0
- ; typedef OptionBits LAFeedbackType
-
-
- kLAAcceptedAsIs EQU 0
- kLAHomophoneSelected EQU $01
- kLALocalReanalysis EQU $02
- kLATransLiterate EQU $04
- ;
- ; Error Value
- ;
-
- laEngineNotFoundErr EQU -7000 ; can't find the engine
- laPropertyErr EQU -7001 ; Error in properties
- laPropertyNotFoundErr EQU -7002 ; can't find the property
- laPropertyIsReadOnlyErr EQU -7003 ; the property is read only
- laPropertyUnknownErr EQU -7004 ; the property is unknown to this environment
- laPropertyValueErr EQU -7005 ; Invalid property value
- laDictionaryTooManyErr EQU -7006 ; too many dictionaries
- laDictionaryUnknownErr EQU -7007 ; can't use this dictionary with this environment
- laDictionaryNotOpenedErr EQU -7008 ; the dictionary is not opened
- laTextOverFlowErr EQU -7009 ; text is too long
- laFailAnalysisErr EQU -7010 ; analysis failed
- laNoMoreMorphemeErr EQU -7011 ; nothing to read
- ;
- ; Handling Context
- ;
- ;
- ; extern OSStatus LAOpenContext(LAEnvironmentLocaleObjectRef environ, LAContextRef *context, OSStatus *specificErr, AERecord *which)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION LAOpenContext
- ENDIF
-
- ;
- ; extern OSStatus LACloseContext(LAContextRef context)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION LACloseContext
- ENDIF
-
- ;
- ; Handling Environment
- ;
- ;
- ; extern OSStatus LAGetEnvironmentProperty(LAEnvironmentLocaleObjectRef environment, LAPropertyKey propertyKey, LAPropertyType desiredType, ByteCount maxSize, LAPropertyType *actualType, ByteCount *actualSize, LogicalAddress value)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION LAGetEnvironmentProperty
- ENDIF
-
- ;
- ; extern OSStatus LASetEnvironmentProperty(LAEnvironmentLocaleObjectRef environment, LAPropertyKey propertyKey, LAPropertyType propertyType, ByteCount valueSize, ConstLogicalAddress value, OSStatus *specificErr)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION LASetEnvironmentProperty
- ENDIF
-
- ;
- ; Handling dictionries
- ;
- ;
- ; extern OSStatus LAOpenDictionary(LAEnvironmentLocaleObjectRef environ, DCMDictionaryID dictionaryID, AERecord *dictionaryProperty)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION LAOpenDictionary
- ENDIF
-
- ;
- ; extern OSStatus LACloseDictionary(LAEnvironmentLocaleObjectRef environ, DCMDictionaryID dictionary)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION LACloseDictionary
- ENDIF
-
- ;
- ; extern OSStatus LAListAvailableDictionary(LAEnvironmentLocaleObjectRef environ, ItemCount maxCount, ItemCount *actualCount, DCMDictionaryID dictionaryList[2147483647])
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION LAListAvailableDictionary
- ENDIF
-
- ;
- ; Analyzing text
- ;
- ;
- ; extern OSStatus LAMorphemeAnalysis(LAContextRef context, ConstTextObject text, LAMorphemePath *leadingPath, LAMorphemePath *trailingPath, ItemCount pathCount, LAMorphemeBundle *result)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION LAMorphemeAnalysis
- ENDIF
-
- ;
- ; extern OSStatus LAContinuousMorphemeAnalysis(LAContextRef context, ConstTextObject text, Boolean incrementalText, LAMorphemePath *leadingPath, LAMorphemePath *trailingPath, Boolean *modified)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION LAContinuousMorphemeAnalysis
- ENDIF
-
- ;
- ; extern OSStatus LAGetMorphemes(LAContextRef context, LAMorphemePath *result)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION LAGetMorphemes
- ENDIF
-
- ;
- ; extern OSStatus LAShiftMorphemes(LAContextRef context, ItemCount morphemeCount, LAMorphemePath *path, ByteCount *byteCount)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION LAShiftMorphemes
- ENDIF
-
- ;
- ; extern OSStatus LAResetAnalysis(LAContextRef context)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION LAResetAnalysis
- ENDIF
-
- ;
- ; extern OSStatus LAGetAllHomographs(LAContextRef context, const LAMorphemePath *path, LAItemOffset morphemeOffset, LAMorpheme *morpheme)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION LAGetAllHomographs
- ENDIF
-
- ;
- ; extern OSStatus LAGetRootForm(LAContextRef context, const LAMorphemePath *path, LAItemOffset morphemeOffset, LAMorphemePath *rootForm)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION LAGetRootForm
- ENDIF
-
- ;
- ; Learning
- ;
- ;
- ; extern OSStatus LAFeedbackPath(LAContextRef context, LAMorphemePath path, LAItemOffset startingPosition, ItemCount morphemeCount, LAFeedbackType *feedbackType, Boolean confirmed)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION LAFeedbackPath
- ENDIF
-
- ;
- ; TextObject interface
- ;
- ;
- ; extern OSStatus LAAnnotateTextObjectWithMorpheme(ConstStr255Param analysisClass, ItemCount tagCount, DCMFieldTag *tags, TextObject text)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION LAAnnotateTextObjectWithMorpheme
- ENDIF
-
- ENDIF
- ENDIF
- ENDIF ; __LANGUAGEANALYSIS__
-
-